<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@taglib uri="http://java.sun.com/jsf/html" prefix="h" %>

<f:view>
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
            <title>Global Image - &Aacute;reas de atua&ccedil;&atilde;o</title>
            <link rel="stylesheet" type="text/css" href="/globalimage2/faces/jsfcrud.css" /><%@ include file="/WEB-INF/jspf/AjaxScripts.jspf" %><script type="text/javascript" src="/globalimage2/faces/jsfcrud.js"></script>
        </head>
        <body>
            <%@include file="../../WEB-INF/jspf/header/head.jspf"%>

            <div style="float:left">
                <%@include file="../../WEB-INF/jspf/header/menuDinamico.jspf"%>
            </div>
            <div id="div_content">
                <h:form styleClass="jsfcrud_list_form">
                <div class="bgContentTable">
                    <div class="titleTable">
                        <h3>&Aacute;reas de atua&ccedil;&atilde;o</h3>
                    </div>
                    <br />
                    <h:panelGroup id="messagePanel" layout="block">
                        <h:messages errorStyle="color: red; " infoStyle="color: green" layout="table"/>
                    </h:panelGroup>


                    <h:commandLink action="#{areaAtuacao.createSetup}" value="Nova"/>&nbsp;<h:outputText escape="false" value="Não foi encontrado registros<br />" rendered="#{areaAtuacao.pagingInfo.itemCount == 0}" />
                    <h:panelGroup rendered="#{areaAtuacao.pagingInfo.itemCount > 0}">
                        <div style="text-align:right;width:200px;float:right;margin-right:5px;">
                       <h:outputText value="Item #{areaAtuacao.pagingInfo.firstItem + 1}..#{areaAtuacao.pagingInfo.lastItem} de #{areaAtuacao.pagingInfo.itemCount}"/>&nbsp;
                        <h:commandLink action="#{areaAtuacao.prev}" value="Anterior #{areaAtuacao.pagingInfo.batchSize}" rendered="#{areaAtuacao.pagingInfo.firstItem >= areaAtuacao.pagingInfo.batchSize}"/>&nbsp;
                        <h:commandLink action="#{areaAtuacao.next}" value="Próximo #{areaAtuacao.pagingInfo.batchSize}" rendered="#{areaAtuacao.pagingInfo.lastItem + areaAtuacao.pagingInfo.batchSize <= areaAtuacao.pagingInfo.itemCount}"/>&nbsp;
                        <h:commandLink action="#{areaAtuacao.next}" value="Restantes #{areaAtuacao.pagingInfo.itemCount - areaAtuacao.pagingInfo.lastItem}"
                                       rendered="#{areaAtuacao.pagingInfo.lastItem < areaAtuacao.pagingInfo.itemCount && areaAtuacao.pagingInfo.lastItem + areaAtuacao.pagingInfo.batchSize > areaAtuacao.pagingInfo.itemCount}"/>
                        </div>
                        <h:dataTable value="#{areaAtuacao.areaAtuacaoItems}" var="item" border="0" cellpadding="2" cellspacing="0" rowClasses="jsfcrud_odd_row,jsfcrud_even_row" rules="all" style="border:solid 1px;width:90%;">
                        
                            <h:column>
                                <div class="nome200px">
                                    <f:facet name="header" >
                                        <h:outputText value="Nome" />
                                    </f:facet>
                                    <h:commandLink action="#{areaAtuacao.detailSetup}" >
                                        <f:param name="jsfcrud.currentAreaAtuacao" value="#{jsfcrud_class['entidade.controller.JSF.util.JsfUtil'].jsfcrud_method['getAsConvertedString'][item][areaAtuacao.converter].jsfcrud_invoke}"/>
                                        <h:outputText value=" #{item.nome}" />
                                    </h:commandLink>
                                </div>
                            </h:column>

                        </h:dataTable>
                    </h:panelGroup>
                </div>
            </h:form>
            </div>
        </body>
    </html>
</f:view>
